/*
 * ===========================================================================
 *
 *       Filename:  list.h
 *
 *       Version:  1.0
 *       Created:  10/04/2011 04:36:32 PM
 *       Compiler:  gcc
 *
 *       Author:  durand_y, <yoan.durand@gmail.com>
 *
 * ===========================================================================
 */
#ifndef LIST_H_
# define LIST_H_
# include "tools.h"

typedef struct              list
{
    char                    *dir;
    struct  list            *next;
    int                     size;
}                           s_list;

/*
 * Initialize the list
 */
s_list  *init(void);
/*
 * add an element in tail
 */
s_list  *add(s_list         *list,
             char           *elt);
/*
 * delete the element for the list
 */
s_list  *del(s_list         *list,
             char           *elt);
/*
 * print the list
 */
int     print(s_list        *list);
/*
 * search elt in list
 */
char    *search_elt(s_list  *list,
                    char    *elt);
/*
 * clear list
 */
void    clear(s_list        *list);
#endif /* !LIST_H_ */
